Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[js/googleai]: feat: Adds support for Gemini Files API URLs. Fixes #737 #742

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

mbleigh
Copy link
Collaborator

@mbleigh mbleigh commented Aug 3, 2024

There is a new Gemini Files API which allows uploading large files for use with Gemini, but Genkit wasn't compatible because we proactively download https:// URLs.

This PR fixes that by:

  1. Adding a filter option to downloadRequestMedia middleware and filtering out File API URLs.
  2. Updating toGemini logic to properly pass through non-data URLs.

Checklist (if applicable):

  • Tested (manually, unit tested, etc.)
  • Docs updated

Copy link
Contributor

@xavidop xavidop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGM

@mbleigh mbleigh merged commit 19a6223 into main Aug 7, 2024
4 checks passed
@mbleigh mbleigh deleted the gemini-files branch August 7, 2024 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants